<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Rails::Configuration</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Rails::Configuration</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/rails/railties/lib/initializer_rb.html">
                vendor/rails/railties/lib/initializer.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
The <a href="Configuration.html">Configuration</a> class holds all the
parameters for the <a href="Initializer.html">Initializer</a> and ships
with defaults that suites most <a href="../Rails.html">Rails</a>
applications. But it&#8216;s possible to overwrite everything. Usually,
you&#8216;ll create an <a href="Configuration.html">Configuration</a> file
implicitly through the block running on the <a
href="Initializer.html">Initializer</a>, but it&#8216;s also possible to
create the <a href="Configuration.html">Configuration</a> instance in
advance and pass it in like this:
</p>
<pre>
  config = Rails::Configuration.new
  Rails::Initializer.run(:process, config)
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M001611">after_initialize</a>&nbsp;&nbsp;
      <a href="#M001612">after_initialize_blocks</a>&nbsp;&nbsp;
      <a href="#M001604">breakpoint_server</a>&nbsp;&nbsp;
      <a href="#M001605">breakpoint_server=</a>&nbsp;&nbsp;
      <a href="#M001614">builtin_directories</a>&nbsp;&nbsp;
      <a href="#M001608">database_configuration</a>&nbsp;&nbsp;
      <a href="#M001610">environment</a>&nbsp;&nbsp;
      <a href="#M001609">environment_path</a>&nbsp;&nbsp;
      <a href="#M001615">framework_paths</a>&nbsp;&nbsp;
      <a href="#M001606">new</a>&nbsp;&nbsp;
      <a href="#M001603">plugins=</a>&nbsp;&nbsp;
      <a href="#M001607">set_root_path!</a>&nbsp;&nbsp;
      <a href="#M001613">to_prepare</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">action_controller</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A stub for setting options on <a
href="../ActionController/Base.html">ActionController::Base</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">action_mailer</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A stub for setting options on <a
href="../ActionMailer/Base.html">ActionMailer::Base</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">action_view</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A stub for setting options on <a
href="../ActionView/Base.html">ActionView::Base</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">active_record</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A stub for setting options on <a
href="../ActiveRecord/Base.html">ActiveRecord::Base</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">active_resource</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A stub for setting options on <a
href="../ActiveRecord/Base.html">ActiveRecord::Base</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">cache_classes</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
Whether or not classes should be cached (set to false if you want
application classes to be reloaded on each request)

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">controller_paths</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The list of paths that should be searched for controllers. (Defaults to
<tt>app/controllers</tt> and <tt>components</tt>.)

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">database_configuration_file</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The path to the database configuration file to use. (Defaults to
<tt>config/database.yml</tt>.)

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">frameworks</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The list of rails framework components that should be loaded. (Defaults to
<tt>:active_record</tt>, <tt>:action_controller</tt>,
<tt>:action_view</tt>, <tt>:action_mailer</tt>, and
<tt>:active_resource</tt>).

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">load_once_paths</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
An array of paths from which <a href="../Rails.html">Rails</a> will
automatically load from only once. All elements of this array must also be
in <tt>load_paths</tt>.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">load_paths</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
An array of additional paths to prepend to the load path. By default, all
<tt>app</tt>, <tt>lib</tt>, <tt>vendor</tt> and mock paths are included in
this list.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">log_level</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The log level to use for the default <a href="../Rails.html">Rails</a>
logger. In production mode, this defaults to <tt>:info</tt>. In development
mode, it defaults to <tt>:debug</tt>.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">log_path</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The path to the log file to use. Defaults to log/#{<a
href="Configuration.html#M001610">environment</a>}.log (e.g.
log/development.log or log/production.log).

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">logger</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The specific logger to use. By default, a logger will be created and
initialized using log_path and log_level, but a programmer may specifically
set the logger to use via this accessor and it will be used directly.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">plugin_loader</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The class that handles loading each plugin. Defaults to
Rails::Plugin::Loader, but a sub class would have access to fine grained
modification of the loading behavior. See the implementation of
Rails::Plugin::Loader for more details.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">plugin_locators</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The classes that handle finding the desired plugins that you&#8216;d like
to load for your application. By default it is the
Rails::Plugin::FileSystemLocator which finds plugins to load in
<tt>vendor/plugins</tt>. You can hook into gem location by subclassing
Rails::Plugin::Locator and adding it onto the list of
<tt>plugin_locators</tt>.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">plugin_paths</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The path to the root of the plugins directory. By default, it is in
<tt>vendor/plugins</tt>.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">plugins</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
The list of plugins to load. If this is set to <tt>nil</tt>, all plugins
will be loaded. If this is set to <tt>[]</tt>, no plugins will be loaded.
Otherwise, plugins will be loaded in the order specified.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">root_path</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
The application&#8216;s base directory.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">view_path</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The root of the application&#8216;s views. (Defaults to
<tt>app/views</tt>.)

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">whiny_nils</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
Set to <tt>true</tt> if you want to be warned (noisily) when you try to
invoke any method of <tt>nil</tt>. Set to <tt>false</tt> for the standard
Ruby behavior.

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M001606" class="method-detail">
        <a name="M001606"></a>

        <div class="method-heading">
          <a href="#M001606" class="method-signature">
          <span class="method-name">new</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Create a <a href="Configuration.html#M001606">new</a> <a
href="Configuration.html">Configuration</a> instance, initialized with the
default values.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001606-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001606-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 460</span>
460:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
461:       <span class="ruby-identifier">set_root_path!</span>
462: 
463:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">frameworks</span>                   = <span class="ruby-identifier">default_frameworks</span>
464:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_paths</span>                   = <span class="ruby-identifier">default_load_paths</span>
465:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_once_paths</span>              = <span class="ruby-identifier">default_load_once_paths</span>
466:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log_path</span>                     = <span class="ruby-identifier">default_log_path</span>
467:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log_level</span>                    = <span class="ruby-identifier">default_log_level</span>
468:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">view_path</span>                    = <span class="ruby-identifier">default_view_path</span>
469:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">controller_paths</span>             = <span class="ruby-identifier">default_controller_paths</span>
470:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cache_classes</span>                = <span class="ruby-identifier">default_cache_classes</span>
471:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">whiny_nils</span>                   = <span class="ruby-identifier">default_whiny_nils</span>
472:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plugins</span>                      = <span class="ruby-identifier">default_plugins</span>
473:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plugin_paths</span>                 = <span class="ruby-identifier">default_plugin_paths</span>
474:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plugin_locators</span>              = <span class="ruby-identifier">default_plugin_locators</span>
475:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plugin_loader</span>                = <span class="ruby-identifier">default_plugin_loader</span>
476:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">database_configuration_file</span>  = <span class="ruby-identifier">default_database_configuration_file</span>
477: 
478:       <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">framework</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">default_frameworks</span>
479:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{framework}=&quot;</span>, <span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">OrderedOptions</span>.<span class="ruby-identifier">new</span>)
480:       <span class="ruby-keyword kw">end</span>
481:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M001611" class="method-detail">
        <a name="M001611"></a>

        <div class="method-heading">
          <a href="#M001611" class="method-signature">
          <span class="method-name">after_initialize</span><span class="method-args">(&amp;after_initialize_block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Adds a block which will be executed after rails has been fully initialized.
Useful for per-<a href="Configuration.html#M001610">environment</a>
configuration which depends on the framework being fully initialized.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001611-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001611-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 525</span>
525:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">after_initialize_block</span>)
526:       <span class="ruby-identifier">after_initialize_blocks</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">after_initialize_block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">after_initialize_block</span>
527:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001612" class="method-detail">
        <a name="M001612"></a>

        <div class="method-heading">
          <a href="#M001612" class="method-signature">
          <span class="method-name">after_initialize_blocks</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the blocks added with <a
href="Configuration.html#M001611">Configuration#after_initialize</a>
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001612-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001612-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 530</span>
530:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_initialize_blocks</span>
531:       <span class="ruby-ivar">@after_initialize_blocks</span> <span class="ruby-operator">||=</span> []
532:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001604" class="method-detail">
        <a name="M001604"></a>

        <div class="method-heading">
          <a href="#M001604" class="method-signature">
          <span class="method-name">breakpoint_server</span><span class="method-args">(_ = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Deprecated options:
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001604-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001604-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 449</span>
449:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">breakpoint_server</span>(<span class="ruby-identifier">_</span> = <span class="ruby-keyword kw">nil</span>)
450:       <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">%(
451:       *******************************************************************
452:       * config.breakpoint_server has been deprecated and has no effect. *
453:       *******************************************************************
454:       )</span>
455:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001605" class="method-detail">
        <a name="M001605"></a>

        <div class="method-heading">
          <span class="method-name">breakpoint_server=</span><span class="method-args">(_ = nil)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="Configuration.html#M001604">breakpoint_server</a>
</p>
        </div>
      </div>

      <div id="method-M001614" class="method-detail">
        <a name="M001614"></a>

        <div class="method-heading">
          <a href="#M001614" class="method-signature">
          <span class="method-name">builtin_directories</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001614-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001614-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 543</span>
543:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">builtin_directories</span>
544:       <span class="ruby-comment cmt"># Include builtins only in the development environment.</span>
545:       (<span class="ruby-identifier">environment</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'development'</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Dir</span>[<span class="ruby-node">&quot;#{RAILTIES_PATH}/builtin/*/&quot;</span>] <span class="ruby-operator">:</span> []
546:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001608" class="method-detail">
        <a name="M001608"></a>

        <div class="method-heading">
          <a href="#M001608" class="method-signature">
          <span class="method-name">database_configuration</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Loads and returns the contents of the database_configuration_file. The
contents of the file are processed via <a href="../ERB.html">ERB</a> before
being sent through YAML::load.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001608-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001608-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 506</span>
506:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">database_configuration</span>
507:       <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">database_configuration_file</span>)).<span class="ruby-identifier">result</span>)
508:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001610" class="method-detail">
        <a name="M001610"></a>

        <div class="method-heading">
          <a href="#M001610" class="method-signature">
          <span class="method-name">environment</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the currently selected <a
href="Configuration.html#M001610">environment</a>. By default, it returns
the value of the <tt>RAILS_ENV</tt> constant.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001610-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001610-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 518</span>
518:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">environment</span>
519:       <span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ENV</span>
520:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001609" class="method-detail">
        <a name="M001609"></a>

        <div class="method-heading">
          <a href="#M001609" class="method-signature">
          <span class="method-name">environment_path</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The path to the current <a
href="Configuration.html#M001610">environment</a>&#8216;s file
(development.rb, etc.). By default the file is at
<tt>config/environments/#{<a
href="Configuration.html#M001610">environment</a>}.rb</tt>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001609-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001609-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 512</span>
512:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">environment_path</span>
513:       <span class="ruby-node">&quot;#{root_path}/config/environments/#{environment}.rb&quot;</span>
514:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001615" class="method-detail">
        <a name="M001615"></a>

        <div class="method-heading">
          <a href="#M001615" class="method-signature">
          <span class="method-name">framework_paths</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001615-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001615-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 548</span>
548:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">framework_paths</span>
549:       <span class="ruby-identifier">paths</span> = <span class="ruby-node">%w(railties railties/lib activesupport/lib)</span>
550:       <span class="ruby-identifier">paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'actionpack/lib'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">frameworks</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:action_controller</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">frameworks</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:action_view</span>
551:       
552:       [<span class="ruby-identifier">:active_record</span>, <span class="ruby-identifier">:action_mailer</span>, <span class="ruby-identifier">:active_resource</span>, <span class="ruby-identifier">:action_web_service</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">framework</span><span class="ruby-operator">|</span>
553:         <span class="ruby-identifier">paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{framework.to_s.gsub('_', '')}/lib&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">frameworks</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">framework</span>
554:       <span class="ruby-keyword kw">end</span>
555:       
556:       <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;#{framework_root_path}/#{dir}&quot;</span> }.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">dir</span>) }
557:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001603" class="method-detail">
        <a name="M001603"></a>

        <div class="method-heading">
          <a href="#M001603" class="method-signature">
          <span class="method-name">plugins=</span><span class="method-args">(plugins)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001603-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001603-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 429</span>
429:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">plugins=</span>(<span class="ruby-identifier">plugins</span>)
430:       <span class="ruby-ivar">@plugins</span> = <span class="ruby-identifier">plugins</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">plugins</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">to_sym</span> }
431:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001607" class="method-detail">
        <a name="M001607"></a>

        <div class="method-heading">
          <a href="#M001607" class="method-signature">
          <span class="method-name">set_root_path!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Set the root_path to RAILS_ROOT and canonicalize it.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001607-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001607-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 484</span>
484:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_root_path!</span>
485:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">'RAILS_ROOT is not set'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>)
486:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">'RAILS_ROOT is not a directory'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>)
487: 
488:       <span class="ruby-ivar">@root_path</span> =
489:         <span class="ruby-comment cmt"># Pathname is incompatible with Windows, but Windows doesn't have</span>
490:         <span class="ruby-comment cmt"># real symlinks so File.expand_path is safe.</span>
491:         <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(:?mswin|mingw)/</span>
492:           <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>)
493: 
494:         <span class="ruby-comment cmt"># Otherwise use Pathname#realpath which respects symlinks.</span>
495:         <span class="ruby-keyword kw">else</span>
496:           <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>).<span class="ruby-identifier">realpath</span>.<span class="ruby-identifier">to_s</span>
497:         <span class="ruby-keyword kw">end</span>
498:       
499:       <span class="ruby-constant">Object</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:RELATIVE_RAILS_ROOT</span>, <span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>.<span class="ruby-identifier">dup</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">RELATIVE_RAILS_ROOT</span>)
500:       <span class="ruby-operator">::</span><span class="ruby-constant">RAILS_ROOT</span>.<span class="ruby-identifier">replace</span> <span class="ruby-ivar">@root_path</span>
501:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001613" class="method-detail">
        <a name="M001613"></a>

        <div class="method-heading">
          <a href="#M001613" class="method-signature">
          <span class="method-name">to_prepare</span><span class="method-args">(&amp;callback)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add a preparation callback that will run before every request in
development mode, or before the first request in production.
</p>
<p>
See Dispatcher#to_prepare.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001613-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001613-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/railties/lib/initializer.rb, line 538</span>
538:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_prepare</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">callback</span>)
539:       <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Dispatcher</span>)
540:       <span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">to_prepare</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">callback</span>)
541:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>